home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / fpu881 / src6.zoo / rint.s < prev    next >
Text File  |  1991-09-24  |  587b  |  30 lines

  1. # pml compatible lib for the atari sfp004
  2. #
  3. # Michael Ritzert, Oktober 1990
  4. # ritzert@dfg.dbp.de
  5. #
  6. # FUNCTION:    DOUBLE RINT( DOUBLE X )
  7. #
  8. # base =    0xfffa50
  9. #      the fpu addresses are taken relativ to "base":
  10. comm =     -6
  11. resp =    -16
  12. zahl =      0
  13.  
  14. .text
  15.     .globl _rint
  16. .even
  17. _rint:
  18.     lea    0xfffa50,a0
  19. #    movew    #0x5403,a0@(comm)    | fintrz to fp0
  20.     movew    #0x5401,a0@(comm)    | fint   to fp0
  21.     cmpiw    #0x8900,a0@(resp)    | check
  22.     movel    a7@(4),a0@        | load arg_hi
  23.     movel    a7@(8),a0@        | load arg_low
  24.     movew    #0x7400,a0@(comm)    | result to d0
  25. # wait
  26.     .long    0x0c688900, 0xfff067f8
  27.     movel    a0@,d0
  28.     movel    a0@,d1
  29.      rts
  30.